#include<iostream>
using namespace std;
int main() {
  int num,i=1;
  cin>>num; 
  do
  {
  	if(num%2==0) num=num/2;
  	else num=3*num+1;
  	i++;
  }
  while(num!=1);
  cout<<i;
  return 0;
}


